import axios from 'axios'
const carousel = {
    //获取轮播图
    getCarousel(params) {
        return axios({
            url: '/admin/getAllSwiper',
            method: 'GET',
            params
        })
    },
    //删除
    deleteCarousel(params) {
        return axios({
            url: '/admin/deleteSwiper',
            method: 'GET',
            params
        })
    },
    //轮播图搜索
    findByIdSwiper(params) {

        return axios({
            url: '/admin/findByIdSwiper',
            method: 'GET',
            params
        })
    },
    //添加轮播图
    addSwiper(data) {
        return axios({
            url: '/admin/addSwiper',
            method: 'POST',
            data
        })
    },
    //修改轮播图
    updateSwiper(data) {
        return axios({
            url: '/admin/updateSwiper',
            method: 'POST',
            data
        })
    },
    //是否上架
    updateSwiperShow(data) {
        console.log(data);
        return axios({
            url: '/admin/updateSwiperShow',
            method: 'POST',
            data
        })
    }
}
export default carousel;